---
title: Deploying Cloud Foundry on AWS
owner: Release Integration
---

<strong><%= modified_date %></strong>

<p class="note"><strong>Note</strong>: This topic assumes you are using the <a href="https://bosh.io/docs/cli-v2.html#install">BOSH CLI v2</a>.</p>

This topic describes the process for deploying Cloud Foundry using BOSH on Amazon Web Services (AWS). 

Before deploying Cloud Foundry, you must have already deployed BOSH, targeted your BOSH Director, created a Cloud Foundry manifest, and set it as your deployment by completing the procedures in the [Deploying BOSH on AWS](setup_bosh_aws.html) and [Customizing the Cloud Foundry Deployment Manifest for AWS](cf-stub.html) topics.

##<a id="stemcell"></a>Upload a Stemcell ##

Deploying Cloud Foundry starts with specifying a *stemcell*, which BOSH installs on each component virtual machine (VM). A stemcell is a versioned image of a minimal OS skeleton, wrapped with IaaS-specific packaging. 

Perform following steps to upload a stemcell. 

1. Open [https://bosh.io/stemcells](https://bosh.io/stemcells) in a web browser
to view the current list of publicly available BOSH stemcells.

1. Choose a BOSH stemcell for your IaaS. Click the **build number** to 
download the stemcell to your computer. The stemcell downloads as a gzipped tar archive which you should not unzip.

1. In a terminal window, run `bosh upload-stemcell STEMCELL-PATH` to upload your
stemcell to the BOSH Director, where `STEMCELL-PATH` is the location of your 
downloaded stemcell file.
<br><br>
Example: 
<pre class="terminal">
$ bosh upload-stemcell ~/downloads/light-bosh-stemcell-3202-aws-xen-hvm-ubuntu-trusty-go_agent.tgz
</pre>

##<a id="create-release"></a>Build the Cloud Foundry Release##

Run `bosh create-release` to create a Cloud Foundry release.

<pre class="terminal">
$ bosh create-release
</pre>

After some processing, this command prompts you for a development release name.
The release names correspond to the files in `cf-release/releases`.

##<a id="upload-release"></a>Upload the Cloud Foundry Release##

Run `bosh upload-release` to upload the generated release to the BOSH
Director.

<pre class="terminal">
$ bosh upload-release
</pre>

##<a id="deploy"></a>Deploy Cloud Foundry##

Run `bosh -d cf deploy cf-deployment.yml` to deploy the uploaded Cloud Foundry release, using the manifest you created in the [Customizing the Cloud Foundry Deployment Manifest for AWS](cf-stub.html) topic:

<pre class="terminal">$ bosh -d cf deploy cf-deployment.yml</pre>

## <a id="verify"></a>Verify the Deployment ##

1. Run `bosh -d cf vms`. This command provides an overview of the VMs that BOSH manages as part of the Cloud Foundry deployment. The state of every VM should show as **running**.

1. Run `curl api.YOUR-SYSTEM-DOMAIN/info` to test the API endpoint of your Cloud Foundry installation, where `YOUR-SYSTEM-DOMAIN` is the domain you chose for your Cloud Foundry instance.
<br><br>
Examples:
    <pre class="terminal">
    $ curl api.incorrect.example.com/info
    404 Not Found: Requested route ('api.incorrect.example.com') does not exist.

    $ curl api.cloud.example.com
    {
     "code": 10000,
     "description": "Unknown request",
     "error_code": "CF-NotFound"
    }

    $ curl api.api.cloud.example.com/info
    {"name":"vcap","build":"2222","version":2,"description":"Cloud Foundry","authorization_endpoint":"https://login.cloud.example.com","token_endpoint":"https://uaa.cloud.example.com","allow_debug":true}
    </pre>

    If `curl` succeeds, it should return specific JSON-formatted information about your deployment. If `curl` does not succeed, review your networking and make sure your domain has an NS record for your subdomain.
    <br><br>
    If you do not know `YOUR-SYSTEM-DOMAIN` for your Cloud Foundry installation, examine the `system_domain` property in your deployment manifest.

1. You should be able to target your Cloud Foundry installation with the [Cloud Foundry Command Line Interface (cf CLI)](../../cf-cli/index.html) and log in as an administrator. The username is `admin` and the password is specified in the deployment manifest:

    ```
    properties:
      ...
      uaa:
        ...
        scim:
          ...
          users:
          - admin|ADMIN_PASSWORD|...
    ```

For more information about managing organizations, spaces, users, and applications, refer to the [cf CLI](../../cf-cli/index.html) topic.

##<a id="update-cf"></a>Update Cloud Foundry##

* If you make change to your manifest, run `bosh deploy` to update your Cloud
Foundry deployment with these changes.

* If you make changes to the `cf-release` directory, run the following commands to update your Cloud Foundry deployment with these changes:
<pre class="terminal">
  $ bosh create-release && bosh upload-release && bosh -d cf deploy cf-deployment.yml
</pre>